package com.king01.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.king01.dao.TransferDao;
import com.king01.entity.SysOperLog02;
import com.king01.entity.Transfer;
import com.king01.service.TransferService;
import com.king01.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TransferServiceImpl implements TransferService {
    @Autowired
    TransferDao transferDao;

    public Result transferInfo(Integer currentPage, Integer pageSize, String[] time) {
        String startTime = null;
        String endTime = null;
        if (time.length > 0) {
            startTime = time[0];
            endTime = time[1];
        }
        PageHelper.startPage(currentPage, pageSize);
        List<SysOperLog02> transferinfo = transferDao.transferinfo(startTime, endTime);
        System.out.println(transferinfo+"=============");
        PageInfo<SysOperLog02> pageInfo = new PageInfo<>(transferinfo);
        return new Result(200, "成功", pageInfo);
    }
    }
